(** Bombs-Must-Detonate: Linker Syntax Tree 
    @author Brian Go *)

(** Link type is similar to Bmdtc.bmdtype, but we have
    an "anything" type, since certain VM functions can take any
    argument (i.e. print, println) *)
type link_type = 
    LnkInt
  | LnkFloat
  | LnkString
  | LnkBool
  | LnkVoid
  | LnkAnything
  | LnkTemplate of string
  | LnkEnumType of string * int
  | LnkEnum of string * int
  | LnkStruct of string * link_type list
  | LnkArray of link_type
  | LnkList of link_type
  | LnkFunction of link_type list * link_type
  | LnkRef of link_type

(** Linker header expression *)
type link_expr = 
    LnkProvide of string * link_type (** Indicates a remotable function named (string) of type (link_type) is provided by this file *)
  | LnkRequire of string * link_type (** Indicates a remotable function named (string) of (inferred) type (link_type) is required by this file *)
  | LnkCode of string (** The assembler code after the header *)

type link_st = link_expr list


